package com.example.springboot.system.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author he
 * @since 2024-05-28
 */
@Getter
@Setter
@TableName("zhiyue_menu")
@Schema(name = "MenuEntity", description = "$!{table.comment}")
public class MenuEntity extends Model<MenuEntity> {

    @ExcelProperty("编号")
    @Schema(description = "编号")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer id;

    @ExcelProperty("菜单图标")
    @Schema(description = "菜单图标")
    @TableField("menu_icon")
    private String icon;

    @ExcelProperty("菜单名称")
    @Schema(description = "菜单名称")
    @TableField("menu_name")
    private String name;

    @ExcelProperty("菜单路径")
    @Schema(description = "菜单路径")
    @TableField("menu_path")
    private String path;

    @ExcelProperty("菜单组件")
    @Schema(description = "菜单组件")
    @TableField("menu_component")
    private String component;

    @ExcelProperty("标识符")
    @Schema(description = "标识符")
    @TableField("menu_keypath")
    private String keypath;

    @ExcelProperty("菜单排序")
    @Schema(description = "菜单排序")
    @TableField("menu_ranks")
    private String ranks;

    @ColumnWidth(value = 20)
    @ExcelProperty("创建者")
    @Schema(description = "创建者")
    @TableField("create_by")
    private String createBy;

    @ColumnWidth(value = 20)
    @ExcelProperty("创建时间")
    @Schema(description = "创建时间")
    @TableField("create_time")
    private String createTime;

    @ColumnWidth(value = 20)
    @ExcelProperty("更新者")
    @Schema(description = "更新者")
    @TableField("update_by")
    private String updateBy;

    @ColumnWidth(value = 20)
    @ExcelProperty("更新时间")
    @Schema(description = "更新时间")
    @TableField("update_time")
    private String updateTime;

    @ColumnWidth(value = 20)
    @ExcelProperty("伪删除（0-已 1-未）")
    @Schema(description = "伪删除（0-已 1-未）")
    @TableField("undock")
    private Integer undock;

    @ColumnWidth(value = 20)
    @ExcelProperty("状态（0-禁用 1-正常）")
    @Schema(description = "状态（0-禁用 1-正常）")
    @TableField("unlucky")
    private Integer unlucky;

    @ColumnWidth(value = 40)
    @ExcelProperty("备注")
    @Schema(description = "备注")
    @TableField("remark")
    private String remark;
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
